package com.doctcloud.hisinfo.histable.domain.comm;

import com.baomidou.mybatisplus.annotation.TableName;
import com.doctcloud.common.core.annotation.Excel;
import com.doctcloud.common.core.annotation.TableDesc;
import com.doctcloud.common.core.web.domain.BaseCharsetEntity;
import lombok.*;

import java.io.Serializable;

import static com.doctcloud.common.core.utils.StringUtils.trim;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@EqualsAndHashCode(of = {"formCode"})
@TableDesc("药品剂型字典")
//public class DrugFormDictDo extends BaseCharsetEntity {
public class DrugFormDictDo implements Serializable {
    private static final long serialVersionUID = 1L;
    @Excel(name="序号")
    private Integer serialNo;
    @Excel(name="剂型代码")
    private String formCode;
    @Excel(name="剂型名称")
    private String formName;
    @Excel(name="输入码")
    private String inputCode;

    @Data
    public static class primaryKey {
        private final String formCode;
        public primaryKey(String formCode) {
            this.formCode = formCode;
        }
    }

//    public String getFormName() {
//        return super.processGet(formName);
//    }
//
//    public void setFormName(String formName) {
//        this.formName = super.processSet(formName);
//    }

    public void setFormCode(String formCode) {
        this.formCode = trim(formCode);
    }

    public void setFormName(String formName) {
        this.formName = trim(formName);
    }

    public void setInputCode(String inputCode) {
        this.inputCode = trim(inputCode);
    }
}
